package com.xh.rufongwallpaper.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 设备实体类
 *
 * @author XH
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("device")
public class Device implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 设备数据库ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 设备唯一标识
     */
    @TableField("device_id")
    private String deviceId;

    /**
     * 设备型号
     */
    @TableField("device_model")
    private String deviceModel;


    /**
     * 操作系统版本
     */
    @TableField("os_version")
    private String osVersion;


    /**
     * IP地址
     */
    @TableField("ip")
    private String ip;

    /**
     * 最后活跃时间
     */
    @TableField("last_active_time")
    private Date lastActiveTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField("is_deleted")
    @TableLogic
    private Boolean isDeleted = false;
} 